package com.zy.springcloudconsumer.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @program: spring-cloud
 * @className: SpringCloudConfig.java
 * @description:
 * @author: ZY
 * @create: 2020年11月14日 18:53
 **/

@Configuration
public class SpringCloudConfig {

    @Bean
    @LoadBalanced
    public RestTemplate getRestTemplate() {
        return new RestTemplate();
    }
}
